package com.bangdream.michelia.contract;

import android.graphics.Bitmap;

import com.bangdream.michelia.entity.AdBean;
import com.bangdream.michelia.entity.BaseEntity;
import com.bangdream.michelia.entity.FinishedStateBean;
import com.bangdream.michelia.entity.STSBean;
import com.bangdream.michelia.entity.UserMsgBean;

import java.util.Map;

import io.reactivex.Observable;

/**
 * Created by Mr.Wang on 2018/3/30.
 * 909732184@qq.com
 * 用户
 */

public class UserContract {
    public interface IUserView {
        //用户注册验证码
        void setRegisterCode(boolean isSuccess,String stDescribe);
        //注册
        void actionRegister(boolean isSuccess,String stDescribe);
        //登录
        void actionLogin(boolean isSuccess,String stDescribe);
        //找回密码
        void actionFindPassword(boolean isSuccess,String stDescribe);
        //个人中心信息
        void setUserMsg(boolean isSuccess, UserMsgBean userMsgBean);
    }

    public interface IUserPicView{
        void setSTS(boolean isSuccess, STSBean bean);
        void setUrlMsg(boolean isSuccess);
    }

    public interface IUserEditView{
        void isSuccessed(boolean isSuccess);
    }

    public interface IFinishState{
        void setFinishState(boolean isSuccess,FinishedStateBean bean);
    }

    public interface IUserModel {
        Observable getRegisterCode(CodeType type,String stPhoneNumber);
        Observable actionRegister(String stCode,String stPhone,String stPassword);
        Observable actionLogin(String accountName,String password,String verify);
        Observable actionCodeLogin(String accountName,String verify);
        Observable actionThirdLogin(String faceUrl,String nickName,String openId,String userType);
        Observable actionFindPassword(String phone,String verify,String stPassword);

        Observable getUserMsg(String id,String token);

        Observable getSTS(String token);
        Observable uploadPic(String token,String urlPath);

        Observable editUser(Map map);
        Observable getFinishstate();
    }
    public enum CodeType{
        //获取验证码的功能类型 注册 手机登录失败3次需要手机验证 验证码登录 找回密码时获取手机验证码
        REGISTER,LOGINPHONE,LOGINCODE,FINDPASSWORD
    }
}
